class CreateUsers < ActiveRecord::Migration
  def self.up
    create_table :users do |t|
      t.column :username, :string
      t.column :realname, :string
      t.column :hashed_password, :string
      t.column :email, :string
      t.column :mobile, :string
      t.column :last_login_at, :datetime
      t.column :enabled, :boolean, :default => true, :nil => false
      
      t.timestamps
    end
    add_index :users, :username
  end

  def self.down
    drop_table :users
  end
end
